package com.jinbiao.beans;

import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

import com.jinbiao.entity.Apple;

/**
 * BeanFactory 获取 创建bean 和获取bean的属性
 * @author EX_WLJR_ZHUANGJB
 *
 */
public class XMLAppStart {
	
	public static void main(String[] args) {
		@SuppressWarnings("deprecation")
		XmlBeanFactory beanFactory = new XmlBeanFactory(new ClassPathResource("application/bean.xml"));
		Apple apple =  (Apple) beanFactory.getBean("app");
		System.out.println(apple.getName());
	}
}
